package Entity;

/**
 * @author chenjian
 * @version 1.0
 * @date 2025/3/20 15:39
 * @description
 */
public class Manager extends Programmer {
    public double bonus;//奖金

    public Manager() {
        super();
    }

    public Manager(String name, int id, double salary, double bonus) {
        super(name, id, salary);
        this.bonus = bonus;
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }

    public void work(){
        System.out.println(name+"\t工号"+id+"\t工资"+salary+"\t奖金"+bonus+"\t年薪"+finasalary());
    }

    public double finasalary(){
        return salary*12+bonus;
    }
}
